package handler

import (
	"strconv"
	"web_framework/model"
	"web_framework/pkg/constvar"
	"web_framework/pkg/e"
	"web_framework/storage"

)

// 获取 搜索本地资源 队列响应接口
type GetSearchLocalHandle struct {

}

func (getSearchLocalHandle GetSearchLocalHandle) handleMsg(data model.Request, sn string) (result model.Response) {
	// 缓存标记状态
	searchCacheKey := constvar.RouterRedisPrefix + sn + constvar.RedisSearchLocalMidCacheKey + ":" + strconv.Itoa(data.Mid)
	if  storage.RedisExists(searchCacheKey){
		if bo,_ := storage.RedisSet(searchCacheKey, 1 , 20);bo == false{
			e.Log("Info", "更新搜索本地资源缓存标记失败 1104")
		}
	}

	return model.Response{}
}